package com.aspose.cells;

class zbyx extends zcdb {
   zbyx(zbro var1) {
      this.a(var1, false);
   }

   zbyx(zbro var1, boolean var2) {
      this.a(var1, var2);
   }

   void a(zbro var1, boolean var2) {
      this.d = 247;
      int var3 = 8;
      if (var1.j()) {
         var3 += 16;
      }

      this.c = new byte[var3];
      if (var2) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((int)-1), 0, this.c, 0, 4);
      } else if ((var1.b & 255) == 255) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((int)-1), 0, this.c, 0, 4);
      } else if ((var1.b & 255) == 254) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((int)-2), 0, this.c, 0, 4);
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)var1.b), 0, this.c, 0, 1);
      }

      this.c[4] = var1.g();
      byte var4 = 0;
      if (var1.a()) {
         var4 = (byte)(var4 | 1);
      }

      if (var1.b()) {
         var4 = (byte)(var4 | 2);
      }

      if (var1.c()) {
         var4 = (byte)(var4 | 4);
      }

      if (var1.d()) {
         var4 = (byte)(var4 | 8);
      }

      if (var1.e()) {
         var4 = (byte)(var4 | 16);
      }

      if (var1.h()) {
         var4 = (byte)(var4 | 32);
      }

      if (var1.j()) {
         var4 = (byte)(var4 | 64);
      }

      if (var1.i()) {
         var4 = (byte)(var4 | 128);
      }

      this.c[5] = var4;
      int var5 = var1.f() & 255 & 15 + (var1.a & 255) << 4;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, this.c, 6, 2);
      if (var1.j()) {
         this.c[8] = var1.f;
         this.c[12] = var1.g;
         this.c[16] = var1.h;
         this.c[20] = var1.i;
      }

   }
}
